package com.chen.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chen.pojo.Report;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author chen
 * @date 2022/5/5 11:09
 */
@Mapper
public interface ReportMapper extends BaseMapper<Report> {

    @Select("select article_id,article_name,author,id from report group by article_name")
    List<Report> findChildren();


   /*@Select("select article_id,article_name,author from users where author like  #{author} and due like #{due} limit #{pageNum},#{pageSize}")
   List<Report> selectPage(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize,
                          @Param("author") String author, @Param("due") String due);
*/

   @Select("select * from report group by article_id ")
   List<Report> select();


   @Select("select *from report where article_name=#{article_name}")
   List<Report> selectReportName(@Param("article_name") String article_name);


}
